<!DOCTYPE HTML>
<html lang="en">
<head>
  <meta name="copyright" content=
  "Copyright (c) IBM Corporation and others 2000, 2011. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
  <meta charset="utf-8">
  <link rel="STYLESHEET" href="../book.css" type="text/css">
  <title>Synchronizing With the Repository</title>
  <meta name="keyword" content="team">
  <script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"></script>
</head>
<body>
  <h1>Synchronizing With the Repository</h1>Working with shared resources requires tracking their state in context of
  the repository content. This could be done by creating a synchronization that populates the Synchronize view and
  benefiting following advantages:
  <ul>
    <li>The local modification state of the resources being synchronized is kept up-to-date. This means that, if you
    modify a file locally that is within the scope of a synchronization that appears in the Synchronize view, the
    resource will appear automatically in the view, if it is not already there.</li>
    <li>The remote state of all of the resources being synchronized can be refreshed using the Synchronize <img src=
    "../images/synch_participants.svg" alt="" border="0"> button in the toolbar of the Synchronize view.</li>
    <li>The remote state of a selection of resources can be refreshed using the Synchronize command from the context
    menu in the Synchronize view.</li>
  </ul>
  <p>Following methods can be used to create a synchronization.</p>
  <h2>Method 1: Using the Context Menu</h2>
  <p>To synchronize resources in the Workbench with those in the repository:</p>
  <ol>
    <li>In one of the navigation views, select the resources that you want to synchronize.</li>
    <li>Right click and select <b>Team &gt; Synchronize with Repository</b>. The Synchronize view opens.</li>
  </ol>
  <h2>Method 2: Using the Synchronize Action</h2>
  <ol>
    <li>From the Team Synchronizing perspective select the <strong>Synchronize...</strong> action from the Synchronize
    <img src="../images/synch_participants.svg" alt="" border="0"> button drop down.</li>
    <li>Select your VSC type from the list of possible synchronization types and click
    <strong>Next</strong>.<br>
    <em>Note:</em> If there are no other repository providers registered with the Workbench, then you will bypass this
    screen altogether.</li>
    <li>Select the resource scope for the synchronize by either selecting Workspace, Selected Resources or Working Set.
    Then select <strong>Finish.</strong></li>
    <li>The Synchronize view will open.</li>
  </ol>
  <p><em>Note</em>: The synchronize action is not enabled by default in other perspectives. You can enable the action
  to appear in your current perspective by selecting <a class="command-link" href=
  'javascript:executeCommand("org.eclipse.ui.window.customizePerspective")'><img src=
  "PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt="command link"> <strong>Window &gt; Perspective &gt; Customize
  Perspective</strong></a>. Then click on the <strong>Commands</strong> tab and check off <strong>Team</strong>.</p>
  <p><em>Note:</em> It is possible that someone has committed a new revision of your file since you started working on
  it. This will result in a <em>conflict</em>, and care must be taken to resolve this. For this reason, conflicts are
  shown in all modes of the Synchronize view.</p>
  <p><em>Important:</em> It is preferable to update resources in the Workbench first, resolve any conflicts that exist
  by merging, then commit Workbench resources to the repository.</p>
  <h3 class="related">Related Concepts</h3>
  <a href="../concepts/concepts-29.htm">Three way comparisons</a>
  <h3 class="related">Related Tasks</h3><a href="tasks-114.htm">Committing</a><br>
  <a href="tasks-113b.htm">Resolving conflicts</a><br>
  <a href="tasks-68.htm">Comparing resources</a><br>
  <a href="tasks-68dg.htm">Merging changes in the Compare editor</a><br>
  <a href="tasks-100d.htm">Version control life cycle: adding and ignoring resources</a><br>
</body>
</html>
